//
//  UIColor+Theme.m
//  LiveStar
//
//  Created by 漪珊 on 2016/12/13.
//  Copyright © 2016年 apple. All rights reserved.
//

#import "UIColor+Theme.h"

@implementation UIColor (Theme)
#pragma mark -- 颜色

+ (UIColor*)colorWithHexString:(NSString*)stringToConvert{
    if([stringToConvert hasPrefix:@"#"])
    {
        stringToConvert = [stringToConvert substringFromIndex:1];
    }
    NSScanner*scanner = [NSScanner scannerWithString:stringToConvert];
    unsigned hexNum;
    if(![scanner scanHexInt:&hexNum])
    {
        return nil;
    }
    return[self colorWithRGBHex:hexNum];
}

+ (UIColor*)colorWithRGBHex:(UInt32)hex{
    int r = (hex >>16) &0xFF;
    int g = (hex >>8) &0xFF;
    int b = (hex) &0xFF;
    return[UIColor colorWithRed:r /255.0f
                          green:g /255.0f
                           blue:b /255.0f
                          alpha:1.0f];
}

#pragma mark -- 颜色

+ (UIColor *)borderColor
{
    return [self colorWithHexString:@"0CC9DE"];
}

#pragma mark -- 主色

+ (UIColor *)mainColor
{
    return [self colorWithHexString:@"5CDB96"];
}

#pragma mark -- 灰

+ (UIColor *)textGrayColor
{
    return [self colorWithHexString:@"999999"];
}

#pragma mark -- 最浅灰

+ (UIColor *)textLightGrayColor
{
    return [self colorWithHexString:@"cccccc"];
}

#pragma mark -- 特殊颜色

+ (UIColor *)SColor
{
    return [self colorWithHexString:@"93A9BF"];
}

#pragma mark -- tabbar颜色
+ (UIColor *)tabBarColor {
    return [self colorWithHexString:@"B1C1D1"];
}

#pragma mark -- cell 底部的那个线的颜色

+(UIColor *)cellLineColor
{
    return [self colorWithHexString:@"E9EDF2"];
}


#pragma mark -- 导航栏的颜色

+ (UIColor *)navagationBarColor
{
    return [self colorWithHexString:@"01101F"];
}

#pragma mark -- 首页title颜色

+ (UIColor *)homeTitleColor {
    return [self colorWithHexString:@"666666"];
}


#pragma mark --  主黑色
+ (UIColor *)mainBlackColor {
    return [self colorWithHexString:@"333333"];
}

#pragma mark --  主绿色
+ (UIColor *)mainGreenColor {
    return [self colorWithHexString:@"333333"];
}
@end
